package designpatterns.proxy;

public class Proxy implements Subject {
    private Subject1 subject1;

    @Override
    public void request() {
        if(subject1 == null) subject1 = new Subject1();

        before();
        subject1.request();
        after();
    }

    private void before() {
        System.out.println("Proxy.before==================");
    }

    private void after() {
        System.out.println("Proxy.before==================");
    }
}
